package com.j1903;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
//@MapperScan({"com.j1903.mapper","com.j1903.dao"})
@MapperScan({"com.j1903.mapper"})
public class XiaomiApplication {

    public static void main(String[] args) {
        SpringApplication.run(XiaomiApplication.class, args);
    }
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor mpi=
                new MybatisPlusInterceptor();
        mpi.addInnerInterceptor(
                new PaginationInnerInterceptor(DbType.MYSQL));
                return mpi;
                //abcdefghijkmlnopqrstuvwsyz
    }

}
